#!/sbin/openrc-run

: ${cfgfile:="/etc/piler/manticore.conf"}

Description="Searchd for piler daemon"
command="/usr/bin/searchd"
command_args="--config $cfgfile $command_args"
command_user="piler:piler"

piddir=${piddir:-"/run/piler"}
pidfile="${piddir}/${SVCNAME}.pid"

depend() {
	need net
	after firewall mariadb
}

start_pre() {
	checkpath --directory --owner "piler:piler" "$piddir"
}

